﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GrayParrot.Web.Formly
{
    public interface IFormlyFactory
    {
        IFormlyFactory AddDateTimePicker(string key, string label, string description, string placeHolder, bool disabled, bool required, DataDatetimepickerConfig datetimepickerConfig = null, DateTime? value = null);
        IFormlyFactory AddMaskedInput(string key, string label, string description, string placeHolder, bool disabled, bool required, string mask = null);
        IFormlyFactory AddTimePicker(string key, string label, string description, string placeHolder, bool disabled, bool required);
        IFormlyFactory AddDatePicker(string key, string label, string description, string placeHolder, bool disabled, bool required, string datepickePopup = null, DateTime? value = null);
        IFormlyFactory AddRepeatSection(string key, string label, string description, string placeHolder, bool disabled, bool required, DrawDirections drawDirection);
        IFormlyFactory AddInput(string key, string label, string description, string placeHolder, bool disabled, bool required, int? minLength = null, int? maxLength = null, TextFieldBehaviors behavior = TextFieldBehaviors.Text);
        IFormlyFactory AddNumber(string key, string label, string description, string placeHolder, bool disabled, bool required, int? minLength = null, int? maxLength = null, int? min = null, int? max = null, double? value = null);
        IFormlyFactory AddTextArea(string key, string label, string description, string placeHolder, bool disabled, bool required, short rows = 0, short cols = 0);
        IFormlyFactory AddDecimal(string key, string label, string description, string placeHolder, bool disabled, bool required, int? minLength = null, int? maxLength = null, int? min = null, int? max = null, double? value = null, double? step = null);
        IFormlyFactory AddMultiCheckBox(string key, string label, string description, string placeHolder, bool disabled, bool required, string callback = null, string labelProp = null, string valueProp = null, string dependsBy = null, bool forceLoad = false);
        IFormlyFactory AddCheckBox(string key, string label, bool disabled, bool required, bool isChecked = false);
        IFormlyFactory AddRadio(string key, string label, string description, string placeHolder, bool disabled, bool required, string callback = null, string defaultValue = null);
        IFormlyFactory AddSelect(string key, string label, string description, string placeHolder, bool disabled, bool required, string groupProp = null, string callback = null, string labelProp = null, string valueProp = null, string dependsBy = null, bool forceLoad = false);
        IFormlyFactory AddUISelect2(string key, string label, string description, string placeHolder, bool disabled, bool required, string groupProp = null, string callback = null, string labelProp = null, string valueProp = null, string dependsBy = null, bool forceLoad = false, uint? minimumInputLength = null, string editProp = null);
        IFormlyFactory AddImage(string key, string label, string description, string placeHolder, bool disabled, bool required, string folder);

        IFormlyFactory AddAddOn(Position position, string className, string text = null, string onClick = null);
        IFormlyFactory AddEvent(EventTypes eventType, string callback);

        List<FieldItem> Create();
    }
}
